#!/bin/bash

count1=`ps -e | wc -l`
count2=`lsof -i TCP | wc -l`

if [ $count1 -gt 30 ]
then
 echo more than 30 processes are running
fi

if [ $count2 -gt 5 ]
then
 echo more than 5 TCP ports are open
fi
